# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=libudev-zero
pkgver=1.0.3
pkgrel=3
pkgdesc="libudev replacement to use whatever device manager"
url="https://github.com/illiliti/libudev-zero/"
arch="all"
license="ISC"
options="!check" # no tests
makedepends="linux-headers"
provides="udev"
replaces="udev"
provider_priority=20
subpackages="$pkgname-helper $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/illiliti/libudev-zero/archive/$pkgver.tar.gz
	"
pcprefix="$pkgname:pc:"

build() {
	make PREFIX=/usr
	cc -o libudev-zero-helper contrib/helper.c
}

package() {
	make DESTDIR=$pkgdir PREFIX=/usr install
}
helper() {
	pkgdesc="libudev-zero hotplugging helper"
	depends=""
	install -Dm755 $builddir/libudev-zero-helper \
		"$subpkgdir"/usr/libexec/libudev-zero-helper
}

sha512sums="
0fc83f5b87c822da5c4b38373b597db32fee265b1e121bbafee83ae9941d381e0a54d93f0ff74931b126da97bdc559fe83b5178b1e7604371e4263e97da67904  libudev-zero-1.0.3.tar.gz
"
